package com.ai.service.made;


import com.ai.common.CommonResponse;
import com.ai.entity.cameraFunctions.FullFunction;
import com.ai.entity.cameraFunctions.functions.CameraFunctionBindBO;
import com.ai.entity.cameraFunctions.functions.CameraFunctionsPO;
import com.ai.entity.cameraFunctions.timeInterval.TimeIntervalVO;
import com.ai.entity.function.FunctionPO;
import com.ai.entity.made.BaseIdOrNameBO;
import com.ai.entity.made.camera.CameraPO;
import com.ai.entity.made.camera.SwitchCameraAlgorithmBO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Mr.Chen
 * @since 2020-11-15
 */
public interface CameraFunctionsService extends IService<CameraFunctionsPO> {

    void sendFullFunctions();

    /**
     * 获取所有功能的列表。以及每个功能下面摄像头的信息，不包含摄像头的直播状态与功能状态
     *
     * @return
     */
    List<FullFunction> getFullFunctions();


    /**
     * 根据功能获取对应的所有摄像头信息，不包含摄像头的直播状态与功能状态
     *
     * @param functionPO
     * @return
     */
    List<SwitchCameraAlgorithmBO> getCameraByType(FunctionPO functionPO);

    /**
     * 根据功能获取对应的所有摄像头信息，不包含摄像头的直播状态与功能状态，并对该功能下所有摄像头，做开关动作
     *
     * @param functionPO
     * @param status     可以为空，4.开，5.关
     * @return
     */
    List<SwitchCameraAlgorithmBO> getCameraByType(FunctionPO functionPO, Integer status, Map<String, Object> extendedProperties);


    CommonResponse cameraFunctionList(BaseIdOrNameBO baseIdOrNameBO);

    CommonResponse checked(CameraFunctionBindBO cameraFunctionBindBO);

    CommonResponse unchecked(CameraFunctionBindBO cameraFunctionBindBO);

    CommonResponse config(BaseIdOrNameBO baseIdOrNameBO);

    CommonResponse updateConfig(TimeIntervalVO timeIntervalVO);

    CommonResponse listCameraByFunction(BaseIdOrNameBO baseIdOrNameBO);

    List<CameraPO> getCameraSteelList(ArrayList<Integer> funTypeList);

}
